Selection of ISA decoding mode for plural instruction sets based upon instruction address

ABSTRACT

An apparatus and method are provided that enable a multiple instruction set architecture (ISA) central processing unit (CPU) to distinguish between different program instructions corresponding to different ISAs during execution of a multiple-ISA application program. The apparatus allows the multiple-ISA CPU to select a particular ISA decoding mode corresponding to a program instruction. The program instruction is located at an address within an address space of the multiple-ISA CPU. The apparatus includes a plurality of boundary address registers and ISA mode selection logic. The plurality of boundary address registers can be dynamically loaded to partition the address space into a plurality of address ranges, where each of the plurality of address ranges corresponds to each of a plurality of ISA decoding modes. The ISA mode selection logic is coupled to the plurality of boundary address registers. The ISA mode selection logic receives the particular address, and compares it against the plurality of address ranges to determine the particular ISA decoding mode for the particular program instruction.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.09/702,112, filed Oct. 30, 2000 (now U.S. Pat. No. 7,149,878), andincluded herein by reference in its entirety. This application isrelated to U.S. Pat. application Ser. No. 09/702,115, filed on Oct. 30,2000, entitled Translation Lookaside Buffer for Selection of ISA Mode,by common inventors, and having the same assignee as this application.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates in general to the field of instruction processingin computer systems, and more particularly to an apparatus and method ina CPU for executing application programs that consist of programinstructions belonging to different instruction set architectures.

2. Description of the Related Art

A first-generation computer was only capable of executing programs thatwere encoded using a unique set of programming instructions. The uniqueset of programming instructions, or instruction set architecture (ISA)was to be used to develop application programs for execution only onthat first-generation computer. Because of this constraint, systemdesigners typically selected a particular computer for use as a systemcentral processing unit (CPU) based upon its hardware characteristics(e.g., speed, power consumption, etc.) in conjunction with itsinstruction set's ability to implement certain critical functions withina system design. Once the CPU was selected, the system applicationprograms were developed using instructions from the CPU's instructionset and the application programs were exclusively executed on theselected CPU. If system designers desired to upgrade the system's CPU toa more powerful processor, then they were required to recode the systemapplication programs using instructions from the instruction set of themore powerful processor. In the early days of software engineering, thiswas not a significant encumbrance, primarily because there were not verymany application programs in existence, and those that had beendeveloped were not very complex.

Because a CPU can be easily programmed to perform a wide variety offunctions within a system design, within just a few years the number ofCPUs and application programs in the marketplace increasedexponentially. In parallel with these events, technological advances inthe integrated circuit design and fabrication arts began to release asteady stream of more powerful and complex CPU designs. And as thesemore powerful and complex CPU designs were exploited, a number ofmodification and upgrade mistakes were made as a result of recodingexisting application programs. So, hardware and software designers wererequired to focus on preserving and reusing a substantial amount of codethat had already been developed and tested for use with particular CPUdesigns. Consequently, as newer CPUs were introduced, in addition toimplementing a whole “new” set of instructions, the CPUs retained thecapability to execute applications that were coded with “old”instructions. Typically, this ability to execute multiple instructionsets was bounded by a particular manufacturer's line of products. Forexample, Digital Equipment Corporation produced a VAX11 CPU thatsupported newer VAX11 instructions and older PDP11 instructions.

Today, the number of application programs and their complexity continuesto grow. In addition to this growth, another factor has provided both amotivation for innovation as well as a cause for concern. That is, thenumber and diversity of instructions sets that are available today foruse in programming applications has resulted in designers often firstchoosing a specific instruction set for implementation of a systemdesign. Following this selection, one of many CPUs is selected thatimplements the specific ISA. In fact, many present day processorsimplement more than one ISA. These processors are also capable ofexecuting an application program consisting of program modules that arecoded by instructions from different ISAs, i.e., a multiple-ISAapplication program. Accordingly, a system designer can specify aspecific ISA for encoding a specific set of program functions (e.g.,signal processing algorithms) and select other ISAs for encoding othertypes of program functions (e.g., operating system functions, I/Ofunctions, general purpose functions).

Program instructions are represented as binary values. When a particularprogram instruction is fetched from memory and provided to amultiple-ISA CPU for execution, the CPU must have some way of knowingwhich set of instruction decoding rules to apply in order to correctlyprocess a program instruction that has been fetched from a multiple-ISAapplication program.

One approach to indicating the ISA mode for program instructions is toencode the ISA mode as an additional field of the instruction. But thisapproach is very memory inefficient because additional memory bits arerequired for each instruction in a program. A more workable approach,employed by present day multi-ISA CPUs, recognizes the fact thatadjacent program instructions in a multiple-ISA application program tendto be from the same ISA. Hence, the technique that is used today toindicate the ISA mode of particular instruction streams is to insert aspecial program instruction into the instruction stream that directs theCPU to switch ISA modes when instructions from a different ISA areprogrammed. For example, when a CPU is executing a program moduleconsisting of ISA 1 instructions, and the module wishes to transferprogram control to a subroutine comprised of ISA 3 instructions, priorto transferring control to the subroutine, an ISA 1 mode switchinstruction must be executed that directs the CPU to switch to ISA 3mode. Following this, program control is transferred to the subroutinethat consists of ISA 3 instructions.

The technique described above comes in various forms. Hammond et al., inU.S. Pat. Nos 5,638,525 and 5,774,686, discusses a “switch” instructionthat directs a multi-ISA CPU to perform an ISA mode switch and totransfer program control. Jaggar, in U.S. Pat. Nos. 5,568,646 and5,740,461, discusses the use of mode bits within an internal CPUregister to signal a specific ISA mode. Under Jaggar's approach, acalling module first executes an instruction to set the mode bits in theinternal CPU register to indicate the ISA mode of a module that is to becalled. Following this, control is transferred to the called module.Nevill, in U.S. Pat. Nos. 5,758,115, and 6,021,265, describes the use ofpredetermined indicator bits within a program counter register forsignaling ISA modes. The program counter register within a CPU carriesboth the address for the instruction that is to be fetched from memoryand the predetermined bits indicating the ISA mode of the instruction.

All of the above techniques have one shortcoming in common: there is aninterdependency that exists between components of a multi-ISAapplication program that extends beyond the simple transfer of programcontrol. More specifically, a transferring component must know theparticular ISA mode of a component to which flow is to be transferred inorder to direct the CPU to switch ISA modes. One skilled in the art willappreciate that this is a difficult approach for use in a complexapplication program environment because each time a given component of amultiple-ISA application program is encoded into a different ISA mode,it forces a designer to modify all of the components that are referencedby the given component as well, thus increasing the chances for bugs toenter into a system design.

Years ago however, Larsen, in U.S. Pat. No. 5,115,500, proposed anapproach for enabling a CPU to switch ISA modes during the execution ofa multiple-ISA application program that did not require the insertion ofa mode switch instruction into the flow of a transferring component.Larsen associated a program instruction's address in the CPU's addressspace with one of several ISA modes. In essence, Larsen used the upperbits of the program instruction's address to indicate its ISA mode.Hence, all instructions corresponding to a specific ISA mode were storedin one or more memory segments that corresponded to that specific ISAmode. Although Larsen's technique addressed the issue of inserting modeswitch instructions into an application program, his technique for usingthe upper bits of a fetched instruction's address as an indication ofthe instruction's ISA mode is restrictive because it requires that theCPU's address space be partitioned into fixed and equal-sized segments.And fixed, equal-sized segments do not represent the distribution ofcomponents according to different ISA modes within a multiple-ISAapplication program. Larsen's technique for switching ISA modes isinflexible and memory inefficient.

Therefore, what is needed is an apparatus that enables a multiple-ISACPU to select a particular ISA mode for processing a particular programinstruction that does not employ fixed and inflexible segments withinthe CPU's address space.

In addition, what is needed is an ISA mode selection apparatus thatprovides for execution of a multiple-ISA application program, where agiven component of the application program can be modified to adifferent ISA mode without requiring that all components referenced bythe given component be modified as well.

Furthermore, what is needed is an apparatus for executing a multiple-ISAapplication program on a CPU that eliminates the need to insert specialmode switch instructions into the flow of a first component of theapplication program in order for the first component to transfer programcontrol to a second component that is encoded by instructions from adifferent ISA mode.

Moreover, what is needed is a method for executing multiple-ISAapplication programs that reduces the number of changes required to theapplication program when one of its subcomponents is modified to employinstructions from a different ISA.

SUMMARY

The present invention provides a technique for encoding and executingmultiple-ISA application programs that gives system designers theflexibility to dynamically configure the address space of a multiple-ISACPU to meet the unique ISA mode storage requirements of componentswithin the programs. In addition, the present invention obviates theneed for inserting special mode switch instructions into the programflow of the application programs to effect a mode switch during theirexecution. Furthermore, the present invention advantageously allowsdesigners to independently change a particular component of theapplication program to a different ISA without requiring that theymodify all of the components that are referenced by the particularcomponent as well.

In one embodiment, Instruction Set Architecture (ISA) selection logicwithin a CPU is provided for selecting an ISA decoding modecorresponding to a program instruction, where the program instruction islocated at an address within an address space of the multiple-ISA CPU.The selection logic includes a plurality of boundary address registersand ISA mode selection logic. The plurality of boundary addressregisters store boundary addresses that partition the address space intoa plurality of address ranges corresponding to the plurality of ISAdecoding modes. The ISA mode selection logic is coupled to the pluralityof boundary address registers. The ISA mode selection logic receives theaddress, and compares the address to determine the ISA decoding mode forthe program instruction.

One aspect of the present invention features an ISA mode selectionapparatus in a CPU, where the CPU is configured to execute anapplication program having program instructions corresponding to one ormore ISAs. The ISA mode selection apparatus has a boundary addressregister file and an ISA mode controller. The boundary address registerfile maps ISA modes to address ranges within the CPU's address space.The ISA mode controller is coupled to the boundary address registerfile. The ISA mode controller designates a specific ISA mode that is tobe used to execute a specific program instruction, where the specificprogram instruction is located at an address within the CPU's addressspace. The ISA mode controller includes address evaluation logic thatdetermines a specific address range within which the address lies.

Another aspect of the present invention contemplates a CPU for executinga multiple-ISA program. The CPU includes ISA mode selection logic, ISAmode boundary address registers, and an instruction decoder. The ISAmode selection logic provides a first ISA mode that corresponds to afirst program instruction, where the first program instruction isfetched from a first address in memory. The ISA mode boundary addressregisters are coupled to the ISA mode selection logic. The ISA modeboundary address registers partition the memory into address ranges,where one of a plurality of ISA modes is mapped to each of the addressranges, and where the first address lies within one of the addressranges. The instruction decoder is coupled to the ISA mode selectionlogic. The instruction decoder receives the first ISA mode, and decodesthe first instruction according to the first ISA mode.

Yet another aspect of the present invention provides a computer programproduct for use with a computing device. The computer program productincludes a computer usable medium, having computer readable program codeembodied in the medium, for causing a CPU to be described, the CPU beingcapable of executing a multiple-ISA application program. The computerreadable program code includes first program code and second programcode. The first program code provides boundary address registers,configured to partition an address space of said CPU into addressranges, where each address range corresponds to an associated ISA mode.The second program code provides mode selection logic, configured toreceive a particular address corresponding to a particular programinstruction, and configured to compare the particular address againstthe address ranges to determine a particular ISA mode for processing theparticular program instruction.

A further aspect of the present invention contemplates a method in a CPUfor selecting a particular ISA mode during execution of an applicationprogram, where the application program has program instructionsaccording to a plurality of instruction set architectures. The methodincludes partitioning an address space of the CPU into address ranges,the address ranges being designated by contents of a boundary registerfile; mapping each of the address ranges to each of a plurality of ISAmodes; and selecting the particular ISA mode for processing of theprogram instruction according to mapping.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other objects, features, and advantages of the presentinvention will become better understood with regard to the followingdescription, and accompanying drawings where:

FIG. 1 is a diagram illustrating how various components of a related artapplication program may be generated according to different instructionset architectures, where selection of a particular instruction setarchitecture for a particular component is based upon desirablecharacteristics of the particular instruction set architecture.

FIG. 2 is a block diagram illustrating how a related art multiple-ISAprocessor decodes and executes an application program consisting ofprogram instructions taken from three different instruction setarchitectures.

FIG. 3 is a diagram illustrating present day techniques that are used byrelated art processors to select ISA decoding modes when executingmultiple-ISA application programs.

FIG. 4 is a block diagram of a portion of a multiple-ISA processoraccording to the present invention having a boundary address registerfile for selection of ISA modes.

FIG. 5 is a block diagram illustrating pipeline stages of a multiple-ISAprocessor according to the present invention.

FIG. 6 is a block diagram depicting ISA mode selection logic within thedecode/register stage of the processor shown in FIG. 5.

FIG. 7 is a flow chart illustrating a method according to the presentinvention for encoding and executing components of a multiple-ISAapplication program.

DETAILED DESCRIPTION

In light of the above background on the techniques used by present dayCPUs to switch between different ISA modes during the execution of amultiple-ISA application program, several related art examples will nowbe discussed with reference to FIGS. 1-3. These examples point out theproblems associated with developing and executing multiple-ISAapplication programs for execution by today's processors. Moreparticularly, present day multi-ISA programming/execution techniqueseither partition a processor's address space into fixed and equal-sizedsegments, or they preclude an individual component (i.e., module,subroutine, task, etc.) of a multiple-ISA application program from beingchanged from one ISA to the next, without necessitating that allcomponents (i.e., both subordinate and dominant components) referencedby the individual component be modified as well. Following thisdiscussion, a detailed description of the present invention will beprovided with reference to FIGS. 4 through 7. The present inventionprevails over the limitations of present day multi-ISA approaches byproviding an apparatus and method for selecting ISA decode/executionmodes in a CPU in accordance with a set of address boundaries stored inan internal register file, thereby allowing ISA decode/execution modesfor program instructions to be selected based solely upon the locationin memory of a program instruction. The capability of specifying addressboundaries within the register file moreover enables designers toconfigure variable-sized ISA mode segments within the processor'saddress space to tailor memory storage requirements for individualprogram components comprising each of the ISA modes.

Now referring to FIG. 1, a diagram 100 is presented illustrating howvarious components 112, 122, 132 of a related art application programcan be generated according to different instruction set architectures(ISAs) 110, 120, 130, where selection of a particular instruction setarchitecture for a particular component is based upon desirablecharacteristics of the particular instruction set architecture. Thediagram 100 depicts three different instruction set architectures: ISA 1110, ISA 2 120, and ISA 3 130. In this example, program instructionsfrom any of the three ISA's 110-130 can be applied to code components ofan application program, where the application program is developed toimplement a set of functional requirements 140.

At a very high level, an ISA 110, 120, 130 comprises those features of acentral processing unit (CPU) or microprocessor that are essential for adesigner to know. In most instances, those essential features consist ofthe program instructions that are used to develop application programsto run on the CPU/microprocessor along with the architecture ofprogrammable resources within the CPU/microprocessor such as registerfiles and special purpose functional units (e.g., floating point logic).Examples of ISAs that are well known in the art today include MIPS32,MIPS64, PowerPC, and x86.

Even though the high-level architectural features of a processor aretypically prescribed by an ISA 110, 120, 130, program instructionscorresponding to a specific ISA 110-130 need not necessarily be executedon a specific CPU; it is only required that the program instructionsexecute on a CPU that conforms to the specific ISA 110-130. Forinstance, a program component 112, 122, 132 that is encoded usingprogram instructions of the x86 ISA can be executed on any CPU thatimplements the x86 ISA. Likewise, a program component 112, 122, 132coded with MIPS32 program instructions can be executed on any processorthat conforms to the MIPS32 ISA.

In earlier years, application program designers suffered from therestriction of having to encode all of the components 112, 122, 132 ofan application program with program instructions from a singleinstruction set architecture 110, 120, 130. For example, an industrialcontrol application program developed to execute on a PDP11 CPUcomprised program instructions taken only from the PDP11 ISA. Any changein the CPU resulted in a requirement to recode all of the components ofthe application program using program instructions that conformed to theISA of the new CPU. Consequently, selecting a specific ISA 110, 120, 130for use in an application program was generally considered by designersto be at the same priority level as selection of a specific CPU forexecution of the application program. CPUs and their correspondinginstruction set architectures used to be very tightly coupled.

As technology advanced, system designers noted that a substantial amountof application code could be reused following upgrade of a system's CPUbecause, although the CPU had changed, the application programrequirements 140 had not changed. But the existing application codecould not be reused in a practical sense because the application programneeded to be regenerated using program instructions from the ISA 110,120, 130 corresponding to the upgraded CPU. Regenerating applicationcode into a different ISA 110, 120, 130 provided an opportunity for theentry of inadvertent errors at each upgrade instance. Developing anapplication program in a high-level programming language (e.g., FORTRAN,PASCAL, C) lessened the probability for errors to enter into a systemdesign, however, the possibility for errors to occur still persisted.This is because porting an application program to a different ISA 110,120, 130 requires that all of the program's components be recompiled.Consequently, to minimize this error probability, system designers beganto focus on minimizing the number of changes that software must undergoto be ported to a different CPU.

During the late 1970's, CPU designers began to embrace the concept ofminimizing the changes to existing software by providing means forexecuting old code 112, 122, 132 on a new CPU in addition to providingfor the execution of new code 112, 122, 132 on the new CPU. What thismeans is that provisions were made in a new CPU design to implement anolder ISA 110, 120, 130 in addition to providing a newer ISA 110, 120,130. One skilled in the art will remember that Digital EquipmentCorporation's VAX11 CPUs provided a capability to execute applicationswritten in program instructions according to 1) the newer VAX ISA, or 2)the older PDP11 ISA.

In more recent years, however, CPUs have been developed that are capableof non-exclusively executing application programs consisting of programinstructions taken from more than one ISA 110, 120, 130. The capabilityto execute a multiple-ISA application program is a very powerful featurebecause it provides application program designers with the flexibilityto select a specific ISA 110, 120, 130 to implement specificrequirements 140 of an application program that exploits desirablecharacteristics of the specific ISA 110, 120, 130. FIG. 1 shows anexemplary set of application program requirements 140 that areeffectively implemented into a multiple-ISA application programconsisting of program instructions taken from three ISAs 110, 120, 130,where each of the three ISAs 110, 120, 130 possess different desirableproperties.

In this example, program instructions and resources according to ISA 1110 are optimized for fast execution on a conforming CPU, however, ISA 1program instructions are long and require a lot of memory to store.Program instructions and resources according to ISA 2 120 are optimizedto require a small amount of memory, but execution of ISA 2 encodedfunctions on a conforming CPU is much slower than execution of the samefunctions when encoded using ISA 1 110 instructions. Programinstructions and resources according to ISA 3 130 are optimized toimplement certain special functions (e.g., Fast Fourier Transform), yetother functions encoded by ISA 3 instructions require a lot of storagespace and execute much slower than they would were they to be encoded byinstructions from ISA 1 110 or ISA 2 120.

The set of requirements 140 for the application program of FIG. 1depicts three general categories of functions: special functions, thatare most effectively implemented using ISA 3 program instructions;initialization and operating system functions, that typically mustexhibit low latencies and are therefore most effectively encoded usingprogram instructions from ISA 1; and a number of remaining generalpurpose functions that neither require special instructions nor fastexecution. The general purpose functions could perhaps be encoded usingISA 1 instructions, but in a system configuration that is memoryconstrained, a better approach would be to implement all of the generalpurpose functions using program instructions taken from ISA 2 120.

Hence, a multiple-ISA application program that satisfies the programrequirements 140 shown in FIG. 1 is developed for execution on amultiple-ISA CPU by generating program components 112, 122, 132 that useinstructions from each of the three ISAs 110, 120, 130. The specialfunctions are encoded into special function components 132 usinginstructions from ISA 3 130. The time-critical initialization andoperating system functions are implemented by generatinginitialization/operating system components 112 using instructions fromISA 1 110. And system memory is preserved by encoding all of theremaining general purpose functions into general purpose components 122using instructions from ISA 2 120.

Now referring to FIG. 2, a block diagram 200 is presented illustratinghow a related art multiple-ISA processor 210 decodes and executes anapplication program consisting of program instructions taken from threedifferent instruction set architectures. The block diagram 200 depictsthe multiple-ISA CPU 210 that is coupled to a memory 220. Themultiple-ISA processor 210 has fetch logic 212, mode switch/decode logic214, and execution logic 216. The fetch logic 212 accesses programinstructions 222, 224, 226 of the application program from addressedlocations within the memory 220.

In operation, the CPU 210 executes the application program by fetchingprogram instructions 222, 224, 226 from the memory 220 in an order thatis prescribed by the application program itself. Generally speaking, thefetch logic 212 retrieves a particular instruction 222, 224, 226 from aparticular address in the memory 220. The particular program instructionis provided to the mode switch/decode logic 214. The mode switch/decodelogic 214 decodes the particular program instruction into control wordsor control signals (not shown) that direct the execution logic 216 toperform an operation prescribed by the particular program instruction.The execution logic 216 receives the control words/signals and, in turn,performs the prescribed operation. Virtually all present day processors210 fetch program instructions 222, 224, 226 from memory 220 insequentially ascending or sequentially descending address order. Changesin control flow of the application program are achieved through the useof control flow modification instructions, generally referred to in theart as jump instructions. Accordingly, during execution of theapplication program, the fetch logic 212 continues to generatesequential addresses for the retrieval of sequential programinstructions 222, 224, 226 until a jump instruction is encountered.Usually, the jump instruction prescribes a target address in memory 220that contains the next instruction to be executed following the jumpinstruction.

As alluded to above, the primary function performed by the modeswitch/decode logic 214 is translation of a program instruction 222,224, 226 fetched from memory 220 into associated control words/signalsthat direct the execution logic 216 to perform a correspondingprescribed operation. This translation, or decoding, of programinstructions 222, 224, 226 is an extremely complex task that is veryclosely tied to the architecture of the CPU 210. If the CPU 210 iscapable of implementing, or emulating, more than one ISA, then thecomplexity of instruction decoding becomes more complex. For example, anISA 1 instruction 222 stored in memory 220 may very well have the samebit states as an ISA 2 instruction 224. But even though these twoinstructions 222, 224 are equivalent in value to the observer, becausethey correspond to two entirely different instruction set architectures,the two instructions 222, 224 most likely will direct the executionlogic 216 to perform two entirely different operations. Decoding rulesare different for each different ISA.

Since program instructions 222, 224, 226 from different instruction setsare decoded and executed according to entirely different sets of rules,the multi-ISA CPU 210 must provide a means for selecting and applyingthose rules during execution of the multiple-ISA application program.The selective application of ISA decoding rules is a function that isalso performed by the mode switch/decode logic 214. When the fetch logic212 provides an ISA 1 instruction 222 to the CPU 210, the modeswitch/decode logic 214 must be capable of applying ISA 1 decoding moderules so that the ISA 1 instruction 222 can be correctly decoded andexecuted by the CPU 210. Similarly, when the fetch logic 212 provides anISA 2 instruction 222 or an ISA 3 instruction to the CPU 210, the modeswitch/decode logic 214 must be capable of switching the CPU 210 to theproper decoding mode so that the given instruction 224, 226 can becorrectly decoded and executed. A few present day techniques areavailable for switching ISA modes in a multiple-ISA CPU 210 during theexecution of a multiple-ISA application program. These techniques aremore specifically discussed with reference to FIG. 3.

Referring to FIG. 3, a diagram 300 is presented illustrating threetechniques used by related art processors 320, 330, 340 to select ISAdecoding modes when executing multiple-ISA application programs. Thediagram 300 shows relevant mode switch and decoding logic within threemulti-ISA CPUs 320, 330, 340. A first CPU 320 employs a special modeswitch instruction for switching between ISA modes during execution of amultiple-ISA application program. A second CPU 330 employs a techniquethat switches ISA modes based upon the state of a mode bit 335 withinthe CPU's program status word 334. A third CPU 340 reads the state of anunused bit 345 within the CPU's program counter register 344 todetermine one of two ISA modes.

The diagram 300 also shows a memory 310 that contains a portion of amulti-ISA application program consisting of program instructions 312,313, 316, 317 from two ISAs: ISA 1 and ISA 2. The portion of theapplication program has two components 311, 315: component A 311 andcomponent B 315. Component A 311 is programmed using ISA 1 instructions312 and component B 315 is encoded with ISA 2 instructions 316. Inaddition, each of the ISAs have instructions 313, 317 that direct amulti-ISA CPU 320, 330, 340 to switch ISA decoding modes in accordancewith whatever mode switch technique is employed. In particular, thediagram 300 includes ISA 1 mode switch instructions 313 that direct theCPUs 320, 330, 340 to switch to ISA mode 2 and ISA 2 mode switchinstructions 317 that direct the CPUs 320, 330, 340 to switch to ISAmode 1.

To appreciate the operational aspects of each of the three mode switchtechniques, assume that during the execution of component A 311, controlflow of the application program is to be transferred to component B 315at address Y and, following execution of component B 315, control flowis to be returned to component A 311 at address X. When component A 311is being executed, the processors 320, 330, 340 are decoding programinstructions 312 in accordance with ISA 1. And when flow is to betransferred to component B 315, the ISA 1 mode switch instructions 313must first cause the CPUs 320, 330, 340 to switch ISA modes to mode 2followed by a transfer of program flow to address Y. In like manner,when execution of component B 315 is complete and flow must return tocomponent A 311, the ISA 2 mode switch instructions 317 must cause theCPUs 320, 330, 340 to switch ISA modes back to mode 1 and then causeflow to be transferred to address X. To illustrate each of the presentday ISA mode switch techniques, the following paragraphs describe howeach of the three processors 320, 330, 340 are directed to switch fromISA mode 1 to ISA mode 2 along with the transfer of program control toaddress Y.

According to the technique employed by CPU 320, an ISA 1 instruction313, JMPMD2 Y, is executed that directs the first CPU 320 to switch toISA mode 2 and to transfer program control to address Y. This modeswitching technique is employed on Intel® x86 microprocessors and isdescribed by Hammond et al. in U.S. Pat. Nos. 5,638,525 and 5,774,686.Hammond refers to instruction 313 as a “switch instruction” 313.Accordingly, during execution of component A 311, ISA 1 instructions 312are fetched by the CPU 320 and a mode switch detector/router 322 routesthe ISA 1 instructions 312 to an ISA 1 decoder 324. When the switchinstruction 313 is fetched, the mode switch detector/router 322 detectsthe switch instruction 313 and routes following ISA 2 instructions 316to an ISA 2 decoder 326. Consequently, to execute a multiple-ISAapplication program according to this first technique, each time thatprogram control is transferred to a component 315 encoded withinstructions from an ISA that is different from the ISA of thetransferring component 311, a mode switch instruction must be programmedinto the transferring component's instruction flow.

According to the mode switch technique employed by CPU 330, aninstruction 313, SETPSW MODE2, is first executed that directs the secondCPU 320 to set a mode bit 335 within the program status word 334, thussignaling the CPU 330 to switch to ISA mode 2. An ISA 2 jump instruction313, JMP Y, follows in the sequence that directs the CPU to transferprogram control to address Y. The use of a bit 335 or bits of a programstatus word 334 to accomplish ISA mode switches is described by Jaggarin U.S. Pat. Nos. 5,568,646 and 5,740,461. Accordingly, during executionof component A 311, ISA 1 instructions 312 are fetched by the CPU 330and a multi-ISA decoder 332 monitors the state of the mode bit 335 todetermine which ISA decoding rules to apply for a current instruction.When the instruction 313 is executed that modifies the mode bit 335 inthe program status word 334, the multi-ISA decoder 332 detects the stateof the bit 335 and begins decoding following instructions according toISA mode 2. Hence, to execute a multiple-ISA application programaccording to this second technique, each time that program control istransferred to a component 315 that is encoded with instructions from anISA that is different from the ISA of the transferring component 311, aninstruction to set the mode bit 335 of the program status word 334 mustbe inserted into the instruction stream of the transferring component'sinstruction flow and the jump instruction that actually causes flow tobe transferred must be encoded according to the ISA mode of thetransferred component 315. One skilled in the art will appreciate thatit would not be recommended to place the mode bit instruction 313 as thefirst instruction in the transferred program component 315 flow becausethe mode bit instruction 313 must be encoded according to the ISA modeof the transferring component 311, and in an application programcomprising several ISA modes, the transferred component 315 could becalled by components encoded in more than one ISA.

According to the mode switch technique employed by CPU 340, a modifiedjump instruction 313, JMP Y+1, is executed that directs the third CPU340 to switch to ISA mode 2 and to transfer program control to addressY. In particular, a bit 345 or bits of a program counter register 344are employed to indicate which ISA mode is to be used by a multi-ISAdecoder 342. Like the technique used by CPU 330, the decoder 342 of CPU340 monitors the state of bit 345 maintained in program counter register344 to determine which ISA mode is to be used. Nevill describes thisapproach for mode switching in U.S. Pat. Nos. 5,578,115 and 6,021,265.Nevill refers to the type of instruction 313 that modifies the contentsof the program counter register 344 to direct a mode switch as a“veneer” 313. According to Nevill, the bit 345 or bits that are employedto signal the decoder 342 to switch modes are either not provided to itsmemory system or the system is configured to ignore such signalinginformation. Accordingly, during execution of component A 311, ISA 1instructions 312 are fetched by the CPU 340 and provided to a multi-ISAdecoder 342. When the ISA 1 veneer 313 is executed, the decoder 342detects state of the bit 345 and switches to ISA 2 mode. It is notedthat according to Nevill's scheme, jump target addresses must bemanipulated in a calling routine 311 to ensure proper decoding ofinstructions 316 in a called routine 315. Hence, according to the thirdtechnique, the calling component 311 must ensure that the contents ofthe program counter register 344 are manipulated to properly indicatethe ISA mode of the called component 315. One skilled in the art willappreciate as well that manipulation of the mode switch bit 345 in theprogram counter register 344 by a first ISA 2 instruction 316 in thecalled component 315 would not be recommended for the same reasons asput forth in the discussion with reference to the program status wordtechnique.

It is significant to note that under any of the mode switchingtechniques illustrated by the examples of FIG. 3, it is impossible toindependently generate program components 311, 315 in a multiple-ISAapplication program. In all cases a transferring component 311 must haveknowledge of the ISA mode of a transferred component 315 because a modeswitch is accomplished by programming a mode switch instruction 313within the instruction flow of the transferring component 311. As aresult, if a designer desires to recode any component of an applicationprogram using instructions from a different ISA, then all of thecomponents that are referenced by that component must be modified aswell. This is a problem that cuts against the grain of one of the majorobjectives within the software engineering community, that is, tominimize the number of changes that are required when an applicationprogram is modified for reuse. More specifically, when one programcomponent is encoded into a different ISA, changes are also required tobe made in all components that are referenced by the program componentin order to modify mode switch instructions so that they indicate thedifferent ISA mode. The multi-ISA techniques discussed above open thedoor for errors to enter into a system design. One skilled in the artwill agree that it is desirable to change only those components of anapplication program that truly require modifications.

Larsen, in U.S. Pat. No. 5,115,500, advocated an approach for providingindependent program components in a multiple-ISA application program byusing the uppermost bits of a program instruction's address as means forsignaling the ISA mode of the program instruction. In the specificembodiment described by Larsen, the upper three address bits were usedto determine one of two (or more) ISA decoding modes. Program componentsencoded according to, say, ISA 1 mode, were to be stored in a first oneof eight memory segments, program components encoded according to ISA 2mode were stored in the remaining segments (in accordance with oneembodiment).

Although the technique described by Larsen is desirable from thestandpoint that program components are effectively decoupled from allother referenced program components, Larsen's approach is inflexiblebecause it requires that a CPU's address space be partitioned into fixedand equal-sized segments. Practically speaking, the distribution ofinstructions according to each of the ISA modes in a multi-ISA programis not uniform in any sense of the word. In fact, this distributionvaries from program to program as a function of the specificrequirements that are implemented and based upon the particularprocessor upon which the programs are executed. Larsen's equal-sizedsegment technique is disadvantageous because it does not allow memoryspace to be partitioned according to the specific needs of a multi-ISAapplication program.

The present invention overcomes the limitations of present day multi-ISAtechniques by providing an apparatus and method for switching ISA modesduring the execution of a multiple-ISA application program thateliminate the need to modify referenced components when a givencomponent is changed to a different ISA, as well as providing forflexible partitioning of memory into ISA mode segments that can betailored to meet the unique storage requirements of individualmultiple-ISA applications. The present invention is more particularlydescribed with reference to FIGS. 4-7.

Referring to FIG. 4, a block diagram 400 is presented illustrating aportion of a multiple-ISA processor 450 according to the presentinvention having a boundary address register file 460 for selection ofISA modes. The boundary address register file 460 comprises a pluralityof boundary address registers 461, each containing an address boundary,BDY2-BDYN. The address boundaries, in one embodiment of the presentinvention, are addresses within the address space of the CPU 450 thatmark lower address bounds of ISA mode address ranges. Each of theaddress ranges is mapped to one of a number of ISA modes that areimplemented by the CPU 450. In an alternative embodiment, the addressesdenote upper address bounds of the address ranges. The block diagram 400also depicts a memory 410 having locations that span the address spaceof the CPU 450. Within the memory 410 are stored program instructions412, 416, 414, 418, 419 corresponding to N different instruction setarchitectures. For illustrative purposes, two components, component A411 comprised of ISA 1 instructions 412 and component B 415 comprised ofISA 2 instructions 416, are specifically stored within the memory 410 todistinguish encoding of these components 411, 415 according to thepresent invention from like components 311, 315 described above withreference to FIG. 3. In addition, the block diagram 400 features programinstructions corresponding to ISA 3 414, ISA N-1 418, and ISA N 419stored in their respective address ranges in memory 410. address rangesin memory 410.

Operationally, the address space, or memory range, of the CPU 450according to the present invention is partitioned according to thecontents of the boundary address registers 461. In the embodiment shownin FIG. 4, a default value of address 0 provides a lower bound for theaddress range corresponding to ISA 1 mode. Register BAR 0 461 providesthe lower bound, BDY2, corresponding to ISA 2 mode. Hence, the ISA 1address range spans from address 0 through address BDY2-1. In analternative embodiment, an additional register 461 is provided tospecifically prescribe the lower bound for the ISA 1 address range.Register BAR 1 461 provides a lower bound for the ISA 3 address range,thus establishing an upper bound (i.e., BDY3-1) on an address range forISA 2 components.

In the embodiment shown in FIG. 4, the memory space 410 is partitionedinto unequal segments to accommodate the storage requirements of anexemplary multi-ISA application program stored therein. The featuredembodiment implicitly maps ISA modes to the index of a particularboundary address register 461. For example, if an instruction's addressfalls within the address range bounded by the contents of BAR 0 461 andBAR 1 461, then the ISA decoding mode that is applied to the instructionis mapped to ISA mode 2. Mapping of a particular ISA mode to aparticular boundary address register 461 can be achieved by theregister's index, or, in an alternative embodiment, a portion of thecontents of the boundary address register 461 comprise a field (notshown) that indicates the particular ISA mode to be used todecode/execute instructions that fall within that address range.

In an embedded application embodiment, contents of the boundary registerfile 460 are established during initialization of the CPU 450 viahardwired signals (not shown) or via the execution of code from a bootread-only memory (ROM) (not shown). In a non-embedded embodiment,contents of the register file 460 can be established either via boot ROMduring initialization, or the boundaries can be dynamically altered byan operating system as application programs are fetched and loaded intothe memory 410.

Note that both components A 411 and B 415, in contrast to likecomponents 311, 315 discussed with reference to FIG. 3, do not containany “mode switch” instructions. This is because mode switch instructionsare not required for the processor 450 according to the presentinvention; ISA mode management is directly mapped to address ranges inthe CPU's address space. The ISA 1 instruction 412 that directs the CPU450 to transfer program flow to address Y is merely an ISA 1 jumpinstruction 412. And the ISA 2 instruction 416 that directs the CPU 450to return program flow to address X is merely an ISA 2 jump instruction416. Component A 411 is not required to know the ISA mode of any of thecomponents that it references. For example, if a system designer were torecompile component B 415 such that it comprised program instructionsaccording to ISA 3 mode, then component B 415 would be the onlycomponent that required changing within the application program. Linkersoftware would then assign the newly encoded component B 415 to theaddress range corresponding to ISA 3 mode. Hence, the present inventionminimizes the number of changes that are required when reusingpreviously compiled components in a multi-ISA application program.

Now referring to FIG. 5, a block diagram is presented illustratingpipeline stages of a multiple-ISA processor 500 according to the presentinvention. The processor 500 includes a fetch stage 510, adecode/register stage 520, an execute stage 530, a data stage 540, and awrite back stage 550. The block diagram also depicts a memory 560 thatprovides program instructions to the fetch stage 510 of the CPU 500. Aboundary register file 522 within the decode/register stage 520 iscoupled to ISA mode control logic 524.

In operation, the fetch stage 510 fetches program instructions from thememory 560 in an order prescribed by an application program. The addressof each fetched program instruction is carried along with the programinstruction in an instruction pointer buffer 512. Fetched programinstructions and their addresses are provided to the decode/registerstage 520.

The decode/register stage 520 decodes a fetched program instruction intocontrol words/signals that direct logic in subsequent stages 530, 540,550 of the CPU 500 to perform certain subtasks corresponding to anoperation prescribed by the fetched program instruction. Additionally,contents of a general purpose register file (not shown) are accessed asprescribed by the program instruction within the decode/register stage.In the embodiment of the present invention shown in FIG. 5, when theprogram instruction is provided to the decode/register stage 520, theprogram instruction's address is received into the mode control logic524. The mode control logic 524 compares the program instruction'saddress against the contents of the boundary register file 522 todetermine a particular address range within which the address lies. Themode control logic 524 then selects a particular ISA mode thatcorresponds to a particular boundary address register (not shown) whosecontents bound the particular address range. Thus, the programinstruction is decoded and executed according to the particular ISA modeselected by the mode control logic 524.

Control words/signals and the contents of general purpose registers (ifany) are provided to the execute stage 530, wherein results of theprescribed operation are generated. The results are provided to the datastage 540.

The data stage 540 executes load and store operations to data memory(not shown). Contents of a general purpose register are written to thedata memory as prescribed by logic within this stage 540 or contents ofa data memory location can be retrieved and provided to the write backstage 550.

The write back stage 550 writes the results generated in the executestage 530 or contents of data memory retrieved by the data stage 540into prescribed registers in the general purpose register file. Hence,program instructions are fetched from memory 560 by the fetch stagelogic 510 and synchronously proceed through subsequent CPU stages520-550 in a fashion very much like an assembly line. Accordingly, thepresent invention does not require that any additional “switch” or“veneer” instructions be inserted into the pipeline flow in order toexplicitly direct the CPU 500 to switch ISA modes because a givenprogram instruction's ISA mode is implicitly carried in itscorresponding address. This is advantageous from an execution speedperspective because the insertion of additional instructions into theflow of the pipeline bogs down the execution of an application program.

The architectural stages 510-550 of the CPU embodiment presented in FIG.5 are representative of a multi-ISA CPU. Particular CPUs may have moreor less stages, or the functions of a particular CPU may be partitioneddifferently, or certain functions may appear in a slightly differentorder (such as those functions discussed with reference to the execute530 and data stages 540). Regardless of the variations that exist,however, one skilled in the art will appreciate that the ISA modeselection logic 524 must be within or precede the decode stage 520. Theillustrated CPU embodiment 500 stations the mode control logic 524 andthe boundary register file 522 within the decode/register stage 520because other general purpose registers are accessed within this stage520 as well.

Now referring to FIG. 6, a block diagram is presented depicting ISA modeselection logic 620 within a decode/register stage 600 of the processor500 shown in FIG. 5. The decode/register stage 600 has instructiondecode logic 640 that receives a program instruction from a programinstruction register 610. The register 610 has an instruction field 611for the program instruction itself (i.e., binary representation of theinstruction including, for example, opcode) and an address field 612that contains the address of the program instruction. Contents of theinstruction field 611 are provided to the instruction decoder 640 andcontents of the address field 612 are provided to the ISA mode selectionlogic 620. The ISA mode selection logic 620 includes address evaluationlogic 621 that is coupled to a boundary address register file 630. TheISA mode controller 620 provides an ISA mode output via bus 622 to theinstruction decoder 640. The instruction decoder 640 outputs decodedcontrol words/signals to subsequent CPU stages (not shown) via anexecution control register 642. Exemplary ISA mode address rangeboundaries are shown loaded within boundary address registers BAR 1 631through BAR 7 631.

Operationally, as a program instruction flows from fetch stage logic(not shown) to the decode/register stage 600, its address is retrievedby the address evaluation logic 621 from the address field 612 of theinstruction buffer 610. The address evaluation logic 621 compares theretrieved address against the address ranges defined by the contents ofthe boundary address registers 631 in the register file 630. In oneembodiment, the address evaluation logic 621 sequentially compares theretrieved address to the contents of the registers 631 to determine theparticular address range within which the retrieved address lies. In analternative embodiment, the address evaluation logic 621 performsparallel comparisons to determine the particular address range. As FIG.6 depicts, retrieved address D0000000 falls within the particularaddress range bounded by addresses 0C0000000 and 0E0000000 prescribedrespectively by boundary address registers BAR 1 631 and BAR 2 631. In alower address bound embodiment, the retrieved address of the programinstruction is mapped to register BAR 1 631. The address evaluationlogic 621 confirms to the ISA mode controller 620 that address D0000000corresponds to boundary address register BAR 1. The mode selector 620,in turn, outputs ISA mode 1 over bus 622.

Accordingly, the instruction decoder 640 implements decoding rulesaccording to ISA mode 1 to correctly decode and execute the ISA 1program instruction provided in the instruction field 611 of theinstruction buffer 610. The program instruction's correctly decodedcontrol words/signals are thus output to the execution control register642.

Now referring to FIG. 7, a flow chart 700 is presented illustrating amethod according to the present invention for encoding and executingcomponents of a multiple-ISA application program.

Flow begins at block 702, where compiled components of a multi-ISAapplication program are provided to a linker/loader application programaccording to the present invention. Flow then proceeds to block 704.

At block 704, software within the linker/loader program processes thecomponents of the multi-ISA application program. The linker/loadersegregates components of the program into categories corresponding toeach one of a plurality of ISA modes that are employed within theapplication program. The distribution of address space required amongall of the components falling into each one of the ISA modes is used bythe linker/loader to determine and establish address ranges in theaddress space of a CPU according to the present invention. Each of theaddress ranges is mapped to an address boundary that is to be stored ina corresponding address boundary register within the CPU. Flow thenproceeds to block 706.

At block 706, the linker/loader loads contents of the boundary addressregisters and all of the program components into their correspondingaddress range in a memory device (or a file) for execution by the CPU.Flow then proceeds to block 708.

At block 708, the CPU according to the present invention fetches a nextinstruction of the application program from the memory into which it hasbeen loaded. Along with the next instruction, an address of the nextinstruction, ADDR, is fetched. Flow then proceeds to block 710.

At block 710, address comparison logic within the CPU compares theaddress of the next instruction, ADDR, against the address boundariesstored in the address boundary registers. In one embodiment, theboundary register index whose contents are the smallest upper bound forthe address is determined by the address comparison logic. Flow thenproceeds to block 712.

At block 712, ISA mode selection logic in the CPU selects a specific ISAdecoding mode for the next instruction that equals the boundary registerindex determined in block 710. Flow then proceeds to block 714.

At block 714, the next instruction is decoded by a multi-ISA instructiondecoder in the CPU in accordance with decoding rules corresponding tothe particular ISA decoding mode selected in block 712. Flow thenproceeds to block 708, where an instruction following the nextinstruction is fetched from memory.

The method continues until the CPU ceases fetching instructions, anevent that is typically caused by removal of power.

The examples of FIGS. 4 through 7 clearly illustrate that a multi-ISAapplication program can be effectively executed on a CPU according tothe present invention without requiring complex cosmeticinterrelationships between calling and called program components. Thisis because the present invention allows a program instruction's ISA modeto be established by its address within the CPU's address space. When adesigner desires to change the ISA mode of a given component within theapplication program, all that is required is that the given component berecoded into the chosen ISA mode; no changes are required to be made tocomponents that call the given component or to components called by thegiven component. Moreover, address ranges corresponding to different ISAmodes can be flexibly tailored to serve differing ISA mode storagerequirements of the program because address range boundaries are basedupon the contents of a boundary address register file that is loadedprior to or at the time of execution of the application program.

Although the present invention and its objects, features, and advantageshave been described in detail, other embodiments are encompassed by theinvention as well. In addition to implementations of the invention usinghardware, the invention can be embodied in software disposed, forexample, in a computer usable (e.g., readable) medium configured tostore the software (i.e., computer readable program code). The programcode causes the enablement of the functions or fabrication, or both, ofthe invention disclosed herein. For example, this can be accomplishedthrough the use of general programming languages (e.g., C, C++, etc.),hardware description languages (HDL) including Verilog HDL, VHDL, AHDL(Altera Hardware Description Language) and so on, or other programmingand/or circuit (i.e., schematic) capture tools available in the art. Theprogram code can be disposed in any known computer usable mediumincluding semiconductor memory, magnetic disk, optical disc (e.g.,CD-ROM, DVD-ROM, etc.), and as a computer data signal embodied in acomputer usable (e.g., readable) transmission medium (e.g., carrier waveor any other medium including digital, optical or analog-based medium).As such, the code can be transmitted over communication networksincluding the Internet and intranets. It is understood that thefunctions accomplished and/or structure provided by the invention asdescribed above can be represented in a core that is embodied in programcode and may be transformed to hardware as part of the production ofintegrated circuits. Also, the invention may be embodied as acombination of hardware and software.

In addition, the present invention has been particularly characterizedin terms of a CPU or microprocessor. In particular, one embodiment ofthe present invention described with reference to FIG. 5 portraysapplication within a 5-stage pipelined CPU 500. These specificembodiments and characterizations are presented herein as representativeembodiments for the present invention, however, such description shouldby no means restrict application of the concept of basing ISA decodingmode for the processing of program instructions upon prescribed andvariable-sized address ranges. On the contrary, the present inventioncan be embodied within a multi-ISA graphics processor, a multi-ISAdigital signal processor, as well as less commonly known components toinclude multi-ISA communications processors, multi-ISA video processors,multi-ISA memory controllers, and multi-ISA micro controllers.

Furthermore, the present invention has been specifically presented interms of a multiple-ISA CPU that is capable of implementing certainwell-known instruction set architectures to include MIPS32, MIPS64, x86,and PowerPC. These exemplary ISAs are employed herein because theyprovide a recognizable basis for teaching the present invention,however, it should not be construed that application of the presentinvention is limited to these ISAs. Rather, the present inventioncontemplates boundary address-based ISA mode distinction of programinstructions included in instruction set extensions within a family ofinstructions such as MIPS32, MIPS64, 16/32-bit x86, MMX, etc., as wellas distinctions between the ISAs of different manufacturers.

Finally, CPU embodiments according to the present invention have beendescribed at a level that does not rely upon the type of instructionsets employed, how the instructions are formatted, or how theinstructions are processed within the CPU. This is because address-basedISA mode selection contemplates application within complex instructionset architectures (CISC), reduced instruction set architectures (RISC),architectures providing for fixed-length or variable-lengthinstructions, in-order processors, and out-of-order processors as wellas the embodiments specifically described herein.

Those skilled in the art should appreciate that they can readily use thedisclosed conception and specific embodiments as a basis for designingor modifying other structures for carrying out the same purposes of thepresent invention, and that various changes, substitutions andalterations can be made herein without departing from the spirit andscope of the invention as defined by the appended claims.

1. A computer program product comprising a computer readable storagemedium having control logic stored therein for causing a computer toexecute instructions corresponding to one of a plurality of instructionset architecture (ISA) decoding modes, comprising: first control logicfor associating a plurality of instructions segregated into at least afirst category and a second category with at least a first address rangeand a second address range, wherein the first category and the firstaddress range correspond to a first ISA decoding mode, and the secondcategory and the second address range correspond to a second ISAdecoding mode, and wherein the first address range and the secondaddress range allow an arbitrary non-overlapping range of addresses tobe associated with the first and second categories without requiring asymmetrical memory partition based on high-order address bits; andsecond control logic for providing the first address range and thesecond address range to a central processing unit (CPU), whereininstructions fetched from memory at locations corresponding to the firstaddress range are designated for decoding according to the first ISAdecoding mode, and instructions fetched from memory at locationscorresponding to the second address range are designated for decodingaccording to the second ISA decoding mode.
 2. The computer programproduct of claim 1, wherein the second control logic provides theaddress ranges to the CPU during initialization of the CPU.
 3. Thecomputer program product of claim 1, further comprising: third controllogic for allowing alteration of the address ranges by an operatingsystem as application programs are fetched and loaded into memory.
 4. Amethod for determining instruction set architecture (ISA) decoding modesto decode program instructions of a multiple ISA application programrunning on a processor, wherein the multiple ISA application programincludes instructions associated with a first ISA decoding moderequiring a first amount of memory space and instructions associatedwith a second ISA decoding mode requiring a second amount of memoryspace, and wherein the processor includes a plurality of boundaryaddress registers and an ISA mode controller coupled to the plurality ofboundary address registers, the method comprising: (1) storingapplication program instructions of a calling program component, atleast some of the instructions of the calling program componentassociated with the first ISA decoding mode, in the first amount ofmemory space that begins at a first memory address, (2) writing thefirst memory address to a first boundary address register of theplurality of boundary address registers, wherein the first memoryaddress acts as a first boundary address that partitions the memory andbounds a first memory address range, and wherein the first memoryaddress range allows an arbitrary non-overlapping range of addresses tobe associated with the first memory address range without requiring asymmetrical memory partition based on high-order address bits; (3)storing application program instructions of a called program componentthat is called by the calling program component, at least some of theinstructions of the called program component associated with the secondISA decoding mode, in the second amount of memory that begins at asecond memory address, (4) writing the second memory address to a secondboundary address register of the plurality of boundary addressregisters, wherein the second memory address acts as a second boundaryaddress that further partitions the memory and bounds a second memoryaddress range, and wherein the second memory address range allows anarbitrary non-overlapping range of addresses to be associated with thesecond memory address range without requiring a symmetrical memorypartition based on high-order address bits; (5) retrieving a programinstruction of the called program component from a third memory address,wherein the called program component is called during execution of thecalling program component; (6) comparing the third memory address withthe first and second boundary address registers to determine whether thethird memory address corresponds to an existing memory address range;(7) generating, if the third memory address corresponds to an existingaddress range, an ISA decoding mode indicator; and (8) selecting an ISAdecoding mode in response to the ISA decoding mode indicator.
 5. Themethod of claim 4, wherein a memory address having a value greater thanthe first boundary address and less than the second boundary addresscorresponds to the first memory address range.
 6. The method of claim 4,wherein a memory address having a value less than the first boundaryaddress and greater than the second boundary address corresponds to thefirst memory address range.
 7. The method of claim 4, wherein step (2)and step (4) occur during initialization of the processor.
 8. The methodof claim 4, wherein step (2) and step (4) are performed by an operatingsystem as application programs are fetched and loaded into memory.
 9. Ina pipelined multiple instruction set architecture (ISA) centralprocessing unit (CPU) adapted to execute instructions of at least oneapplication program containing instructions associated with a pluralityof ISA decoding modes, a method for executing the instructions,comprising: receiving instruction addresses segregated into categories,each category corresponding to one of a plurality of ISA decoding modesof the CPU; associating a specific address range with each category,wherein each address range corresponds to a selected one of theplurality of ISA decoding modes and is defined by upper and lowerboundary addresses, and wherein each address range allows an arbitrarynon-overlapping range of addresses to be associated with a categorywithout requiring a symmetrical memory partition based on high-orderaddress bits; and comparing, as program instructions are fetched frommemory, an address of each instruction to the address range associatedwith each category to determine an ISA decoding mode of the instruction.10. The method of claim 9, wherein the receiving step includes receivingboundary addresses during initialization of the CPU.
 11. The method ofclaim 10, further comprising: altering boundary addresses as applicationprograms are fetched and loaded into memory.
 12. The method of claim 9,wherein the receiving step comprises receiving instruction addressesfrom executing software of a linker/loader program.
 13. The method ofclaim 9, further comprising: segregating the plurality of instructionsinto categories with a linker/loader program.
 14. A method for encodinginstructions from at least one application program before execution by amultiple ISA CPU, the method comprising: associating each instructionwithin the at least one application program with one of a plurality ofcategories wherein each category corresponds to one of a plurality ofISA decoding modes; segregating instructions within a bounded addressrange defined by upper and lower boundary addresses such that allinstructions identified by the bounded address range are associated withonly one of the plurality of categories and have a common ISA decodingmode, wherein the bounded address range allows an arbitrarynon-overlapping range of addresses to be associated with a categorywithout requiring a symmetrical memory partition based on high-orderaddress bits; and providing the bounded address range to the multipleISA CPU before executing the segregated instructions.
 15. The method ofclaim 14, further comprising executing a linker/loader program tosegregate the instructions.